package com.competition.reception.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.competition.commonutils.R;
import com.competition.reception.entity.CourseVideo;
import com.competition.reception.entity.vo.VideoInfo;
import com.competition.reception.entity.vo.VideoQueryVo;
import com.competition.reception.mapper.CourseVideoMapper;
import com.competition.reception.service.CourseVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author testjava
 * @since 2021-04-04
 */
@Service
public class CourseVideoServiceImpl extends ServiceImpl<CourseVideoMapper, CourseVideo> implements CourseVideoService {

    @Override
    public R getVideoList(VideoQueryVo queryVo) {
        int count=baseMapper.getVideoCount(queryVo);
        List<VideoInfo> videoInfoList=baseMapper.getVideoInfoList(queryVo);
        return R.ok().data("count",count).data("videoInfoList",videoInfoList);
    }
}
